package day15;

public class Algorithm08 {
    public static void main(String[] args) {        //爬楼梯，每次可爬1、2、3层
        System.out.println(F(20));
    }
    private static int F(int i){
        if(i==1){return 1;}
        else if(i==2){return 2;}
        else if(i==3){return 4;}
        else return F(i-1)+F(i-2)+F(i-3);
    }
}

